package model.location;

import model.Coordinate;

public class WorldCoordinate extends Coordinate {

	@Override
	public void setX(float x) {
		_x = x;
	}

	@Override
	public void setY(float y) {
		_y = y;
	}

	private float _z;
	
	public float getZ() {
		return _z;
	}

	public void setZ(float z) {
		this._z = z;
	}
	
	public WorldCoordinate(float x, float y, float z) {
		super(x, y);
		setZ(z);
	}
	
	public WorldCoordinate()
	{
		super(-1, -1);
		setZ(-1);
	}
	
	public boolean hasBeenInitialized()
	{
		return _x != -1 && _y != -1 && _z != -1;
	}

	@Override
	public String toString() 
	{
		return String.format("%d_%d_%d", (int) _x, (int) _y, (int) _z);
	}
}

